from rest_framework import generics,status
from .serializer import *
from .models import JenkinsConfig,Jenkins


class JenkinsListView(generics.ListCreateAPIView):
    queryset = Jenkins.objects.all()
    serializer_class = JenkinsSerializer

class JenkinsDetailView(generics.RetrieveUpdateDestroyAPIView):
    queryset = Jenkins.objects.all()
    serializer_class = JenkinsSerializer

class JenkinsConfigListView(generics.ListCreateAPIView):
    queryset = JenkinsConfig.objects.all()
    serializer_class = JenkinsConfigSerializer

class JenkinsConfigDetailView(generics.RetrieveUpdateDestroyAPIView):
    queryset = JenkinsConfig.objects.all()
    serializer_class = JenkinsConfigSerializer